import { Controller, Get, Post, Query, UseGuards } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { Request } from 'express';
import { HelloService } from './hello.service';

@Controller('/hello')
export class HelloController {
  constructor(private readonly helloService: HelloService) {}

  @UseGuards(AuthGuard('jwt'))
  @Get()
  getHello(@Query() request:Request): string {
    return this.helloService.getHello();
  }

  @Post('/set')
  setValue(@Query() res:Request){
    return "success";
  }
}
